<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>test2</title>
</head>
<script src="bower_components/jquery/dist/jquery.js"></script>
<body>

<div id="abc">
	show AAAAA
</div> 
<br/>
<div id="aaa">
	The Array is:
</div>

<h1>
    你好：<span th:text="${abc}">请跟我来</span>
</h1>
<div th:text="${abc}"></div>

<div th:include="test3 :: test3"></div>

<div th:include="test3 :: test31"></div>

</body>
<script type="text/javascript">

	$(function(){
		
		$('#abc').append("<b>ddddddddDD</b>"); 
		
		test1();
		test2();
	});

	function test1(){
		var aa = ["aa","bb","cc","dd","ee","ff"];
		$.each(aa,function(index,item){
			console.log(index+","+item);
			$('#aaa').append(item+" ");
		}); 
	}
	
	function test2(){
		console.log('test2()');
		var bb = [];
		bb.push(123);
		bb.push(443);
		bb.push(333);
		showArray(bb);
		bb.pop();		//移除最后一个
		showArray(bb);
	}
	
	function showArray(array1){
		console.log('showArray');
		$.each(array1,function(index,item){
			console.log(index+","+item);
		});
	}
	
/*
 * 
 $(function () {
     var json = [{ name: "张三", sex: "男" }, { name: "李四", sex: "女" }, { name: "王五", sex: "gay"}];  //自定义一个json数组
     $.each(json, function (index, obj) {
         alert(index + "..." + obj.name+"..."+obj.sex);
     });
 });
 */	
</script>
</html>